#include <iostream>
#include <windows.h>

using namespace std;

typedef int (ADD)(int,int);
typedef int (DESC)(int,int);

int main()
{
	HINSTANCE hInst=LoadLibraryA("test3.dll");
	if (hInst==NULL)
	{
		cout<<GetLastError()<<endl;
		return 0;
	}
	FARPROC ptr=GetProcAddress(hInst,"Add");
	cout<<((ADD*)ptr)(1,2)<<endl;
	ptr=GetProcAddress(hInst,"Desc");
	cout<<((DESC*)ptr)(2,1)<<endl;
	FreeLibrary(HMODULE("test3.dll"));
}